When measuring the relevancy of the answer set, if the precision is high but the recall is low, it means that most of the relevant documents are retrieved, but too many irrelevant documents are returned as well.
For any node in an AVL tree, the height of the left subtree must be greater than that of the right subtree.
If a problem can be solved by dynamic programming, it must be solved in polynomial time.
All the languages can be decided by a non-deterministic machine.
For one operation, if its amortized time bound is , then its worst-case time bound must be .
Word stemming is to eliminate the commonly used words from the original documents.
In a red-black tree, the number of internal nodes in the subtree rooted at is no more than where is the black-height of .
The right path of a skew heap can be arbitrarily long.
For any node in an AVL tree, the left and right subtrees must have the same height.
For one operation, if its average time bound is , then its amortized time bound must be .
In a B+ tree, leaves and nonleaf nodes have some key values in common.
Given that problem A is NP-complete. If problem B is in NP and can be polynomially reduced to problem A, then problem B is NP-complete.
Which one of the following statements is TRUE?
Insert {3, 9, 6, 7, 1, 4, 8, 10} into an initially empty 2-3 tree (with splitting), and then delete 7. Which one of the following statements is FALSE about the resulting tree?
Delete the minimum number from the given binomial queue in the following figure. Which one of the following statements is FALSE?
If the depth of an AVL tree is 5 (the depth of an empty tree is defined to be 0), then the minimum possible number of nodes in this tree is:
When solving a problem with input size by divide and conquer, if at each stage the problem is divided into 4 sub-problems of equal size , and the conquer step takes to form the solution from the sub-solutions, then the overall time complexity is:
Starting from the red-black tree given in the figure, after successively inserting the keys {83, 75, 19}, which one of the following statements is FALSE?
Merge the two leftist heaps in the following figure. Which one of the following statements is FALSE?
We can perform BuildHeap for leftist heaps by considering each element as a one-node leftist heap, placing all these heaps on a queue, and performing the following step: Until only one heap is on the queue, dequeue two heaps, merge them, and enqueue the result. Which one of the following statements is FALSE?
A queue can be implemented by using two stacks and as follows:
Assuming that push and pop operations take worst-case time, please select a potential function which can help us prove that enqueue and dequeue operations take amortized time (when starting from an empty queue).
Rod-cutting Problem: Given a rod of total length inches and a table of selling prices for lengths . You are asked to find the maximum revenue obtainable by cutting up the rod and selling the pieces. For example, based on the following table of prices, if we are to sell an 8-inch rod, the optimal solution is to cut it into two pieces of lengths 2 and 6, which produces revenue . And if we are to sell a 3-inch rod, the best way is not to cut it at all.
Length | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
---|---|---|---|---|---|---|---|---|---|---|
Price | 1 | 5 | 8 | 9 | 10 | 17 | 17 | 20 | 23 | 28 |
Which one of the following statements is FALSE?
For the result of accessing 5 in the splay tree in the following figure, besides saying that 5 must be the root, which one of the following statements is also TRUE?
The function RL_Rotation
is to do right-left rotation to the trouble-finder tree node T
in an AVL tree.
typedef struct TNode *Tree;
struct TNode {
int key, h;
Tree left, right;
};
Tree RL_Rotation( Tree T )
{
Tree K1, K2;
K1 = T->right;
K2 = K1->left;
K1->left = (4分);
T->right = (4分);
K2->right = K1;
(4分);
/* Update the heights */
K1->h = maxh(Height(K1->left), Height(K1->right)) + 1;
T->h = maxh(Height(T->left), Height(T->right)) + 1;
K2->h = maxh(K1->h, T->h) + 1;
return K2;
}
序号 | 结果 | 得分 |
---|---|---|
0 | 答案正确 | 4 |
1 | 答案正确 | 4 |
2 | 答案正确 | 4 |